package com.hwadee.JPKC.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hwadee.JPKC.dao.courseInfoMapper;
import com.hwadee.JPKC.entity.courseInfo;
import com.hwadee.JPKC.service.CourseInfoService;

@Service
public class CourseInfoServiceImpl implements CourseInfoService {
	
	@Autowired
	private courseInfoMapper courseInfomapper;

	@Override
	public courseInfo FindId(int cId) {
		// TODO Auto-generated method stub
		return courseInfomapper.selectByPrimaryKey(cId);
	}

	@Override
	public List<courseInfo> FindAll3() {
		// TODO Auto-generated method stub
		return courseInfomapper.selectcourseInfos();
	}

	@Override
	public List<courseInfo> FindAllRe() {
		// TODO Auto-generated method stub
		return courseInfomapper.selectcourseInfoRe();
	}

	@Override
	public List<courseInfo> getAll() {
		// TODO Auto-generated method stub
		return courseInfomapper.getAll();
	}

	@Override
	public courseInfo selectByPrimaryKey(Integer courseId) {
		// TODO Auto-generated method stub
		return courseInfomapper.selectByPrimaryKey(courseId);
	}


	public courseInfo SelectName(String courseDescription) {
		// TODO Auto-generated method stub
		return courseInfomapper.FindName(courseDescription);
	}



	@Override
	public int insertKcXq(courseInfo courseInfo) {
		// TODO Auto-generated method stub
		return courseInfomapper.insertSelective(courseInfo);
	}

	@Override
	public int updateByPrimaryKeySelective(courseInfo courseInfo) {
		// TODO Auto-generated method stub
		return courseInfomapper.updateByPrimaryKeySelective(courseInfo);
	}

	@Override
	public int updateByPrimaryKeySelectiveName(courseInfo courseInfo) {
		// TODO Auto-generated method stub
		return courseInfomapper.updateByPrimaryKeySelectiveName(courseInfo);
	}

	@Override
	public List<courseInfo> selectcourseInfosFour() {
		// TODO Auto-generated method stub
		return courseInfomapper.selectcourseInfosFour();
	}

	@Override
	public List<courseInfo> selectcourseInfosMax() {
		// TODO Auto-generated method stub
		return courseInfomapper.selectcourseInfosMax();
	}

	@Override
	public List<courseInfo> selectcourseInfosMohu(String courseDescription) {
		// TODO Auto-generated method stub
		return courseInfomapper.selectcourseInfosMohu(courseDescription);
	}

	@Override
	public List<courseInfo> selectcourseInfoFour(String academicExchange) {
		// TODO Auto-generated method stub
		return courseInfomapper.selectcourseInfoFour(academicExchange);
	}

	@Override
	public courseInfo selectName(String courseDescription) {
		// TODO Auto-generated method stub
		return courseInfomapper.selectName(courseDescription);
	}


}
